{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "fromtime = 1508466753\n",
    "// 转换时间\n",
    "ft_date = time.localtime(fromtime)\n",
    "fyear = ft_date.tm_year        // 获取到年\n",
    "fmonth = ft_date.tm_mon    // 获取到月\n",
    "fday = ft_date.tm_mday       // 获取到日\n",
    "fhour = ft_date.tm_hour       // 获取到小时\n",
    "fmin = ft_date.tm_min          // 获取到分\n",
    "my_user_cron = CronTab(user=True)\n",
    "job_sendMsg = my_user_cron.new(command='curl http://*****/'+str(mod_name)+'/index.php/Wap/Auto***sion/sendOrderMsg');\n",
    "// 这里让分钟加了4分钟\n",
    "job_sendMsg_time = str(fmin + 4) + ' ' + str(fhour) + ' ' + str(fday) + ' ' + str(fmonth) + ' *'\n",
    "job_sendMsg.setall(job_sendMsg_time)\n",
    "job_sendMsg.enable()"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [default]",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
